package com.br.pfm.persistence.model;

import java.io.Serializable;
import java.util.GregorianCalendar;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

@Entity
@Table(name="PFM_pagamento")
public class Pagamento implements Serializable {
	
	private static final long serialVersionUID = 4061980004270133961L;
	
	@Id
	@GeneratedValue
	@Column(name = "id_pagamento", nullable = false, length = 2)
	private Long idPagamento;
	
	@Getter
    @Setter
	@Column(name = "valor_pago", nullable = false, length = 10)
	private int valorPago;

	@Getter
    @Setter
	@Column(name = "dt_pagamento", nullable = false, length = 10)
	private GregorianCalendar dataPagamento;
	
	@Getter
	@Setter
	@ManyToOne(cascade=CascadeType.ALL)
    private Fatura fatura;
	
	@Getter
	@Setter
	@ManyToOne(cascade=CascadeType.ALL)
    private Terceiro terceiro;
	
}
